<template>
  <div>
    <p>arr:for-of</p>
    <div v-for="(item,index) of list" :key="item.id+'nn'">{{item.name}}---{{index}}</div>

    <p>arr:for-in</p>
    <div v-for="(item,index) in list" :key="item.id">{{item.name}}---{{index}}</div>

    <p>obj:for-of</p>
    <div v-for="(item,key,index) of obj" :key="item.id">{{item}}---{{key}}---{{index}}</div>

    <p>obj:for-in</p>
    <div v-for="(item,key,index) in obj" :key="item.id">{{item}}---{{key}}---{{index}}</div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      list:[
        { name:'lin', id: 11 },
        { name:'huang', id: 12 },
        { name:'liu', id: 13 }
      ],
      obj:{
        txt:'备注',
        addr:'beijing'
      }
    }
  }
}
</script>

<style>

</style>
